From 5d3784e778c0c457f32431e9aac698b18e72c2ab Mon Sep 17 00:00:00 2001 From: robertlipe Date: Sun, 28 Sep 2014 22:34:03 +0000 Subject: [PATCH] Damien Pobel improves metadata handling in GPX 1.1 reader. --- gpsbabel/configure | 4 ++-- gpsbabel/configure.in | 4 ++-- gpsbabel/gpx.cc | 11 ++++++++--- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gpsbabel/configure b/gpsbabel/configure index 1362165fe..84f3d5a27 100755 --- a/gpsbabel/configure +++ b/gpsbabel/configure @@ -4748,9 +4748,9 @@ fi # guess the name of the Qt Core library. QT_LIBVER=$($QMAKE -query -query QT_VERSION | sed -e 's/\..*//') if test "$QT_LIBVER" -ge 5 ; then - QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -l Qt${QT_LIBVER}Core" + QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQt${QT_LIBVER}Core" else - QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -l QtCore" + QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQtCore" fi QT_INC=$($QMAKE -query QT_INSTALL_HEADERS) QT_INC_OPT="-I" diff --git a/gpsbabel/configure.in b/gpsbabel/configure.in index 1a7da97b0..353fe112a 100644 --- a/gpsbabel/configure.in +++ b/gpsbabel/configure.in @@ -168,9 +168,9 @@ fi # guess the name of the Qt Core library. QT_LIBVER=$($QMAKE -query -query QT_VERSION | sed -e 's/\..*//') if test "$QT_LIBVER" -ge 5 ; then - QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -l Qt${QT_LIBVER}Core" + QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQt${QT_LIBVER}Core" else - QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -l QtCore" + QT_LIBS="-L$($QMAKE -query QT_INSTALL_LIBS) -lQtCore" fi QT_INC=$($QMAKE -query QT_INSTALL_HEADERS) QT_INC_OPT="-I" diff --git a/gpsbabel/gpx.cc b/gpsbabel/gpx.cc index a991785db..38e3b1585 100644 --- a/gpsbabel/gpx.cc +++ b/gpsbabel/gpx.cc @@ -293,15 +293,20 @@ typedef struct tag_mapping { * If it's not a tag we explictly handle, it doesn't go here. */ +/* /gpx/ for GPX 1.0, /gpx/metadata/ for GPX 1.1 */ +#define METATAG(type,name) \ + {type, 0, "/gpx/" name}, \ + {type, 0, "/gpx/metadata/" name} + tag_mapping tag_path_map[] = { { tt_gpx, 0, "/gpx" }, - { tt_name, 0, "/gpx/name" }, - { tt_desc, 0, "/gpx/desc" }, + METATAG(tt_name, "name"), + METATAG(tt_desc, "desc"), { tt_author, 0, "/gpx/author" }, { tt_email, 0, "/gpx/email" }, { tt_url, 0, "/gpx/url" }, { tt_urlname, 0, "/gpx/urlname" }, - { tt_keywords, 0, "/gpx/keywords" }, + METATAG(tt_keywords, "keywords"), { tt_wpt, 0, "/gpx/wpt" }, -- 2.30.2